<template>
  <div>

    <div class="item">
      <label>问题反馈类型：</label>
      <span>{{fbTypeName}}</span>
    </div>
    <div class="item">
      <label>问题和意见：</label>
      <span>{{fbContent}}</span>
    </div>
    <div class="item">
      <label>图片证据：</label>
      <div class="img-box">
        <el-image :src="fbPicture"></el-image>
      </div>
    </div>
    <div class="item">
      <label>反馈人：</label>
      <span>{{nickname}}</span>
    </div>
    <div class="item">
      <label>联系方式：</label>
      <span>{{fbContact}}</span>
    </div>
    <div class="item">
      <label>反馈时间：</label>
      <span>{{fbTime}}</span>
    </div>
  </div>
</template>
<script>
import RichText from "@/components/RichText"
import apis from "../../../apis/modules/questionType"

export default {
  components: {
    RichText
  },
  data() {
    return {
      fbId: null,
      fbPicture: '',
      fbContact: '',
      fbContent: '1',
      fbTime: '',
      fbType: '',
      nickname: '',
      fbTypeName : ''
    }
  },
  created() {
    let fbId = this.$route.query.fbId
    if (fbId) {
      this.fbId = fbId
      this.showFeedback()
    }
  },
  methods: {
    showFeedback() {
      apis.showFeedback({fbId: this.fbId}).then((res) => {
        if (res.code == 200) {
          this.fbPicture = res.data.fbPicture;
          this.fbContact = res.data.fbContact;
          this.fbContent = res.data.fbContent;
          this.fbTime = res.data.fbTime;
          this.fbType = res.data.fbType;
          this.nickname = res.data.nickname;
          this.fbTypeName = res.data.fbTypeName;
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
.item {
  margin-top: 32px;
}

label {
  color: #1e1e1e;
  font-weight: 700;
}

.img-box {
  margin-top: 16px;
}
</style>
